# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=asciidoc
pkgver=9.0.2
pkgrel=0
pkgdesc="Text based documentation"
url="http://asciidoc.org/"
arch="noarch"
license="GPL-2.0-or-later and GPL-1.0-or-later"
depends="python3 libxml2-utils docbook-xsl"
makedepends="autoconf automake"
subpackages="$pkgname-doc"
# There is a upstream-created tarball but it has depth=1 which unpacks
# everything into $srcdir instead of $srcdir/$pkgname-$pkgver
source="$pkgname-$pkgver.tar.gz::https://github.com/asciidoc/asciidoc-py3/archive/$pkgver.tar.gz"
builddir="$srcdir/asciidoc-py3-$pkgver"

replaces="$pkgname-vim"

prepare() {
	default_prepare
	autoreconf -fi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="ea8f64ce54d2f1aa38eceb3c1c9be17b388776de58038f3b888ac5ebed76337fa2779e43eb7f47174adf0a0446ee808dbd1e4f8f7e1d7db99db7c4c8584d5624  asciidoc-9.0.2.tar.gz"
